<template>
  <div>
    <el-button type="primary" style="margin-bottom:10px;" @click="onBatchingAuditGoods" size="mini">批量审核商品</el-button>
    <el-button type="warning" style="margin-bottom:10px;" @click="onKeyAuditGoods" size="mini">一键审核</el-button>
    <el-table
      :data="data"
      :border="true"
      :header-cell-class-name="$style.tableHeaderCell"
      v-loading="loading"
      tooltip-effect="dark"
      style="width: 100%;"
      ref="storeTable"
      size="mini"
    >
      <el-table-column type="selection" align="center" width="40" fixed></el-table-column>
      <el-table-column align="center" min-width="150px" prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
      <el-table-column align="center" min-width="100px" prop="topChannelName" label="顶级渠道"></el-table-column>
      <el-table-column align="center" min-width="100px" prop="channelCode" label="渠道编码"></el-table-column>
      <el-table-column align="center" min-width="150px" prop="channelName" label="渠道名称" show-overflow-tooltip></el-table-column>
      <el-table-column align="center" min-width="150px" prop="cellularName" label="蜂窝" show-overflow-tooltip></el-table-column>
      <el-table-column align="center" min-width="60px" prop="city" label="城市"></el-table-column>
      <el-table-column align="center" prop="goodsNum" label="商品数量"></el-table-column>
      <el-table-column align="center" prop="adjustType" label="门店类型"></el-table-column>
      <el-table-column align="center" prop="statusName" label="状态">
        <template slot-scope="scope">
          <div v-if="scope.row.status === 'ALL'" style="color: #13ce66">
            全部处理
          </div>
          <div v-if="scope.row.status === 'INIT'" style="color: red">
            待处理
          </div>
          <div v-if="scope.row.status === 'PART'" style="color: aquamarine">
            部分处理
          </div>
        </template>
      </el-table-column>
      <el-table-column align="center" min-width="100px" prop="handler" label="处理人"></el-table-column>
      <el-table-column align="center" min-width="150px" prop="handleTime" label="处理时间"></el-table-column>
      <el-table-column align="center" min-width="80px" prop="handleTypeName" label="审核类型"></el-table-column>
      <el-table-column align="center" min-width="80px" prop="operationManager" label="操作">
        <template slot-scope="scope">
          <span style="cursor:pointer;color: #409eff;" @click="onOpenDetailModal(scope.row)">
            商品详情
          </span>
        </template>
      </el-table-column>
    </el-table>
    <div :class="$style.tablePagination">
      <el-pagination
        @size-change="onPageSizeChange"
        @current-change="onPageNumChange"
        :current-page="currentPage"
        :page-sizes="[10, 15, 20, 50]"
        :page-size="pageSize"
        layout="total, prev, pager, next, sizes"
        :total="total"
      />
    </div>
  </div>
</template>
<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index';
export default Index;
</script>
